import http from "./request.ts"
// flashProductRelation/list 分页查询不同场次关联及商品信息
export const flashProductRelationList = (params: IFlashProductRelationListParams): RES<any> => http.get(`/flashProductRelation/list?pageNum=${params.pageNum}&pageSize=${params.pageSize}&flashPromotionId=${params.flashPromotionId}&flashPromotionSessionId=${params.flashPromotionSessionId}`)

// flashProductRelation/create 批量选择商品添加关联
export const flashProductRelationCreate = (params: IFlashProductRelationCreateParams[]): RES<IFlashSessionCreateR> => http.post(`/flashProductRelation/create`, params)

// flashProductRelation/delete/{id} 删除关联
export const flashProductRelationDeleteById = (id: number): RES<IFlashSessionCreateR> => http.post(`/flashProductRelation/delete/${id}`)
// flashProductRelation/update/{id} 修改关联信息
export const flashProductRelationUpdateById = (params: IProductList): RES<IFlashSessionCreateR> => http.post(`/flashProductRelation/update/${params.id}`, params)